import request from "@/common/request.js";

//测试登录
export const tset_login = (data) => {
    return request.post("/amp/test_login", data);
};

//登录
export const user_login = (data) => {
    // 创建 FormData 实例
    const formData = new FormData();

    // 将 data 对象中的每个属性添加到 formData 中
    Object.keys(data).forEach((key) => {
        formData.append(key, data[key]);
    });
    return request.post("/amp/user_login", formData, {
        headers: {
            "Content-Type": "multipart/form-data",
        },
    });
};
